//package com.hsc.www.amqp.config;
//
//import com.rabbitmq.client.Channel;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.amqp.core.Message;
//import org.springframework.amqp.core.MessageProperties;
//import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;
//import org.springframework.stereotype.Component;
//
//@Component
//public class MyMessageListener implements ChannelAwareMessageListener {
//    private Logger logger = LoggerFactory.getLogger(MyMessageListener.class);
//
//    @Override
//    public void onMessage(Message message, Channel channel) throws Exception {
//        MessageProperties messageProperties = message.getMessageProperties();
//        // 消息体
//        String messageBody = new String(message.getBody());
//
//        logger.warn("dead letter message：{} | tag：{}", messageBody, message.getMessageProperties().getDeliveryTag());
//
//        channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
//
////        redisTemplate.opsForHash().delete(MQConstants.MQ_CONSUMER_RETRY_COUNT_KEY, messageProperties.getMessageId());
//    }
//
//}